<template>
	<div class="homepage_body">
		欢迎你，{{ name }}
	</div>
</template>

<script>
	import { mapState, mapMutations } from 'vuex';
	export default {
		name: 'HomeModel',
		components: {
			
		},
		data () {
			return {
				name: '张三',
			};
		},
		computed: {
			...mapState('home',['userName'])
		},
		created () {
			
		},
		mounted () {
			this.setUserName(this.name);
			console.log(1,this.userName);
		},
		methods: {
			...mapMutations('home',['setUserName'])
		}
	};
</script>

<style lang="less" scoped>

</style>
